VT-d: pci code cleanup
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 19 Jun 2009 07:45:20 +0000 (08:45 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 19 Jun 2009 07:45:20 +0000 (08:45 +0100)
commit575dd4a3efc5becee027bd17d0777d421f5e6e4f
treea0e8160f809cfd2a6cf9541f59d35841afb8ff07
parentfaefc018df83806c3135b318425fe6c66ffda1b8
VT-d: pci code cleanup

This patch moves the pci code from iommu.c to pci.c. Instead of setup
pci hierarchy in array bus2bridge in iommu_context_mapping, use
scan_pci_devices once to add all existed PCI devices in system to
alldevs_list and setup pci hierarchy in array bus2bridge. In addition,
implement find_upstream_bridge to find the upstream PCIe-to-PCI/PCIX
bridge or PCI legacy bridge for a PCI device, therefore it's cleanly
to handle context map/unmap for PCI device, even for source-id
setting.

Signed-off-by: Weidong Han <weidong.han@intel.com>
xen/drivers/passthrough/pci.c
xen/drivers/passthrough/vtd/iommu.c
xen/include/xen/pci.h